package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BasePageData;
import com.cskaoyan.bean.BaseParam;
import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.Brand;
import com.cskaoyan.service.BrandService;
import com.cskaoyan.utils.Constant;
import com.cskaoyan.utils.ErrState;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("wx/brand")
public class WechatBrandController {



        @Autowired
        BrandService brandService;

        @RequestMapping("list")
        public BaseRespVo list(BaseParam param) {
            PageHelper.startPage(param.getPage(), param.getLimit());
            BasePageData data = brandService.listInWechat(param);
            return BaseRespVo.ok(data);
        }

        @RequestMapping("detail")
        public BaseRespVo detail(Integer id) {
            Brand detail = brandService.detail(id);
            return BaseRespVo.ok(detail);
        }




}
